//import * as RegActions from '../actions/reg'
import { POST_REGFROM,RESET_STATE} from '../actions/reg'
//console.log(RegActions,POST_REGFROM);

/**
 *  数据需要比对检查，越简单越好
 */
const initialState = {
      username: 'lyletest',
      usernameError: '',
      password: '',
      passwordError: ''
}

export default function regStatus(state = initialState, action) {
  switch (action.type) {
    case POST_REGFROM:
      return Object.assign({}, state,action.reg)
    case RESET_STATE:
      return Object.assign({}, state,action.reg)
    default:
      return state
  }
}
